package base_demo.demo4;

public class demo4 {
    public static void main(String[] args) throws InterruptedException {
        //Thread的主要方法
        //1.获取名字和设置名字
//        MyThread t1 = new MyThread("0");
//        t1.start();
//        MyThread t2 = new MyThread("1");
//        t2.start();
        //2.获取当前运行的线程
        Thread thread = Thread.currentThread();
        System.out.println(thread.getName());
        Thread.sleep(3000);
        System.out.println("hello");


    }
}
